package com.mall.order;

import com.mall.order.dto.*;

/**
 * 订单相关业务
 */
public interface OrderCoreService {

    /**
     * 创建订单
     * @param request
     */
    CreateOrderResponse createOrder(CreateOrderRequest request);


    /**
     * @description 获取当前用户所有订单
     * @author ghr
     * @date 2022/1/20 2:03 下午
     * @param request
     * @return com.mall.order.dto.OrderListResponse
     */
    OrderListResponse orderList(OrderListRequest request);

    /**
     * @description 查询订单详情
     * @author ghr
     * @date 2022/1/20 6:13 下午
     * @param request
     * @return com.mall.order.dto.OrderDetailResponse
     */
    OrderDetailResponse orderDetail(OrderDetailRequest request);

    /**
     * @description 取消订单
     * @author ghr
     * @date 2022/1/20 7:25 下午
     * @param request
     * @return com.mall.order.dto.CancelOrderResponse
     */
    CancelOrderResponse cancelOrder(CancelOrderRequest request);

    /**
     * @description 删除订单
     * @author ghr
     * @date 2022/1/20 7:41 下午
     * @param request
     * @return com.mall.order.dto.DeleteOrderResponse
     */
    DeleteOrderResponse deleteOrder(DeleteOrderRequest request);

    /**
     *  支付成功时，更新订单状态，更新锁定库存
     * @param request
     * @return
     */
    PayOrderSuccessResponse payOrderSuccess(PayOrderSuccessRequest request);
}

